Towards Array Bound Check Elimination in Java Virtual Machine Language

نویسندگان

  • Hongwei Xi
  • Songtao Xia
چکیده

The Java Virtual Machine Language (JVML) is a platform independent programming language at bytecode level. A Java program is compiled into JVML bytecode in a standard Java implementation, which may be transferred across networks to various hosts and then interpreted by the Java Virtual Machine. Note that these hosts may not trust the source of the bytecode. For safety concerns, JVML disallows out-of-bounds array access. In practice, this is enforced through run-time array bounds checking. Unfortunately, this practice can be prohibitively expensive in cases involving numerical computation such as animation. In this paper, we propose a type-theoretic approach to eliminating run-time array bound checks in JVML and demonstrate that the property of safe array access can be readily captured with a restricted form of dependent type system and therefore enforced through type-checking. We focus on a language JVMLa, which is basically a subset of JVML with array access instructions, and prove that the execution of a well-typed JVMLa program can never cause memory violations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards array bound check elimination in Java TM virtual machine language

In a standard Java implementation, a Java program is compiled into Java bytecode, which is then interpreted by Java virtual machine (JVM). We refer to the bytecode language as Java virtual machine language in this paper. For safety concerns, JVM performs run-time array bounds checking to detect out-of-bounds array access. Unfortunately , this practice can be prohibitively expensive in cases inv...

متن کامل

Safe, multiphase bounds check elimination in Java

As part of its type-safety regime, the Java semantics require precise exceptions at runtime when programs attempt out-of-bound array accesses. This paper describes a Java implementation that utilizes a multiphase approach to identifying safe array accesses. This approach reduces runtime overhead by spreading the out-of-bounds checking effort across three phases of compilation and execution: pro...

متن کامل

USENIX Association Proceedings of the Java TM Virtual Machine Research

A Java virtual machine (JVM) must sometimes check whether a value of one type can be can be treated as a value of another type. The overhead for such dynamic type checking can be a signi cant factor in the running time of some Java programs. This paper presents a variety of techniques for performing these checks, each tailored to a particular restricted case that commonly arises in Java program...

متن کامل

Array bounds check elimination in the context of deoptimization

Whenever an array element is accessed, Java virtual machines execute a compare instruction to ensure that the index value is within the valid bounds. This reduces the execution speed of Java programs. Array bounds check elimination identifies situations in which such checks are redundant and can be removed. We present an array bounds check elimination algorithm for the Java HotSpot VM based on ...

متن کامل

Compile Time Elimination of Null- and Bounds-Checks

SafeTSA is a new type safe intermediate representation for mobile code based on static single assignment form. We developed SafeTSA as an alternative to the Java Virtual Machine. Programs in SafeTSA contain explicit nulland bounds-check instructions, allowing their elimination. Type safety is maintained by enforcing the use of only nulland bounds-checked values in dereference and index operatio...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999